package constant.milk.aptprice.database;

import java.util.HashMap;


import android.content.Context;

public class DbInsertQuery
{
	private Context context;
	private DbAdapter db;
	
	public DbInsertQuery(Context context, DbAdapter db)
	{
		this.context = context;
		this.db = db;
	}
	
	public void setBeginTansaction() throws Exception
	{
		db.beginTansaction(context);
	}
	
	public void setSuccessful() throws Exception
	{
		db.setTransactionSuccessful();
	}
	
	public void setEndTansaction() throws Exception
	{
		db.endTransaction(context);
	}
	
	public void setAptData(HashMap<String, String> map) throws Exception
	{
		db.insert(context, map, TableName.APT_DATA);
	}
	
	public void setMyHouse(HashMap<String, String> map) throws Exception
	{
		db.insert(context, map, TableName.MY_HOUSE);
	}
}
